package analiseSemantica;

public class Stmt {

	Expr exprRef = null;
	Stmt stmtRef = null;
	Stmt stmtRef2 = null;
	Block blockRef = null;
	int cat;
	String id;
	String str;
	String id2;
	public int line;

	public Stmt(int cat) {
		this.cat = cat;
	}
	
	public String getId2(){
		return id2;
	}

	public Stmt(String st, int cat) {
		this.cat = cat;
		if (cat == 5)
			this.id = id;

		if (cat == 7)
			this.str = st;
	}
	
	public Stmt(int cat, String id, String id2) {
		this.cat = cat;
		this.id2 = id2;
		this.id = id;
	}

	public Stmt(int cat, Object ob) {
		this.cat = cat;

		if (ob instanceof Expr)
			this.exprRef = (Expr) ob;

		if (ob instanceof Block)
			this.blockRef = (Block) ob;

	}

	public Stmt(int cat, Object ob, Object ob2) {
		this.cat = cat;

		if (ob instanceof Expr)
			this.exprRef = (Expr) ob;

		if (ob2 instanceof Stmt)
			this.stmtRef = (Stmt) ob2;

	}

	public Stmt(int cat, Object ob, Object ob2, Object ob3) {
		this.cat = cat;

		if (ob instanceof Expr)
			this.exprRef = (Expr) ob;

		if (ob2 instanceof Stmt)
			this.stmtRef = (Stmt) ob2;

		if (ob3 instanceof Stmt)
			this.stmtRef2 = (Stmt) ob3;

	}

	public Block getBlockRef() {
		return blockRef;
	}

	public void setBlockRef(Block blockRef) {
		this.blockRef = blockRef;
	}

	public int getCat() {
		return cat;
	}

	public void setCat(int cat) {
		this.cat = cat;
	}

	public Expr getExprRef() {
		return exprRef;
	}

	public void setExprRef(Expr exprRef) {
		this.exprRef = exprRef;
	}

	public Stmt getStmtRef() {
		return stmtRef;
	}

	public void setStmtRef(Stmt stmtRef) {
		this.stmtRef = stmtRef;
	}

	public Stmt getStmtRef2() {
		return stmtRef2;
	}

	public void setStmtRef2(Stmt stmtRef2) {
		this.stmtRef2 = stmtRef2;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getStr() {
		return str;
	}

	public void setStr(String str) {
		this.str = str;
	}

}
